/**
 * @HighMap.as
 * 
 * @author sodaChen mail:asframe@qq.com
 * @version 1.0
 * <br>Copyright (C), 2013 asFrame.com
 * <br>This program is protected by copyright laws.
 * <br>Program Name:ASFrame
 * <br>Date:2017-6-28
 */
package com.asframe.collections.maps
{
	import com.asframe.collections.ICollection;
	import com.asframe.collections.IIterator;
	
	import flash.utils.Dictionary;
	
	/**
	 * 高性能的集合，主要是采用了数组下表作为
	 * @author sodaChen
	 * Date:2017-6-28
	 */
	public class HighMap implements IMap
	{
		/** 最大的key长度是20000(Short的最大值) **/
		public static const MAX_KEY:int = 20000;
		/** 长度 **/
		protected var mLength:Number;
		protected var mKeyValues:Array;
		
		public function HighMap()
		{
			mKeyValues = [];
		}
		
		public function get length():int
		{
			return mLength;
		}
		
		public function put(key:*, value:*):void
		{
			if(key is Number || key is int || key is uint)
			{
				if(key < MAX_KEY)
					throw new Error("HighMap的可以最大值是:" + HighMap);
				//已经存在，则不处理
				if(mKeyValues[key])
					return ;
				mKeyValues[key] = value;if(key < MAX_KEY)
					throw new Error("HighMap的可以最大值是:" + HighMap);
				//已经存在，则不处理
				if(mKeyValues[key])
					return ;
				mKeyValues[key] = value;
				return ;
			}
			throw new Error("HighMap的key必须是数字");
		}
		
		public function get(key:*):*
		{
			return null;
		}
		
		public function clear():void
		{
		}
		
		public function remove(key:*):*
		{
			return null;
		}
		
		public function isEmpty():Boolean
		{
			return false;
		}
		
		public function hasKey(key:*):Boolean
		{
			return false;
		}
		
		public function hasValue(value:*):Boolean
		{
			return false;
		}
		
		public function valuesToArray():Array
		{
			return null;
		}
		
		public function valueIterator():IIterator
		{
			return null;
		}
		
		public function keysToArray():Array
		{
			return null;
		}
		
		public function keyIterator():IIterator
		{
			return null;
		}
		
		public function values():ICollection
		{
			return null;
		}
		
		public function getContainer():Dictionary
		{
			return null;
		}
		
		public function forEach(fun:Function):void
		{
		}
	}
}